//
// Declare all used OpenGl function pointers
//
// christian.schladetsch@gmail.com
//

#pragma once

#include "Sdl.h"
#include "GL/glext.h"

#define DECLARE_GL_PROC(type, name) \
  extern type name

DECLARE_GL_PROC(PFNGLCREATEPROGRAMPROC, glCreateProgram);
DECLARE_GL_PROC(PFNGLDELETEPROGRAMPROC, glDeleteProgram);
DECLARE_GL_PROC(PFNGLISPROGRAMPROC, glIsProgram);
DECLARE_GL_PROC(PFNGLCREATESHADERPROC, glCreateShader);
DECLARE_GL_PROC(PFNGLDELETESHADERPROC, glDeleteShader);
DECLARE_GL_PROC(PFNGLSHADERSOURCEPROC, glShaderSource);
DECLARE_GL_PROC(PFNGLCOMPILESHADERPROC, glCompileShader);
DECLARE_GL_PROC(PFNGLATTACHSHADERPROC, glAttachShader);
DECLARE_GL_PROC(PFNGLDETACHSHADERPROC, glDetachShader);
DECLARE_GL_PROC(PFNGLGETATTACHEDSHADERSPROC, glGetAttachedShaders);
DECLARE_GL_PROC(PFNGLLINKPROGRAMPROC, glLinkProgram);
DECLARE_GL_PROC(PFNGLUSEPROGRAMPROC, glUseProgram);
DECLARE_GL_PROC(PFNGLGETSHADERINFOLOGPROC, glGetShaderInfoLog);
DECLARE_GL_PROC(PFNGLGETPROGRAMINFOLOGPROC, glGetProgramInfoLog);
DECLARE_GL_PROC(PFNGLGETUNIFORMLOCATIONPROC, glGetUniformLocation);
DECLARE_GL_PROC(PFNGLUNIFORM1FPROC, glUniform1f);
DECLARE_GL_PROC(PFNGLUNIFORM1IPROC, glUniform1i);
DECLARE_GL_PROC(PFNGLUNIFORM2FVPROC, glUniform2fv);
DECLARE_GL_PROC(PFNGLUNIFORM3FVPROC, glUniform3fv);
DECLARE_GL_PROC(PFNGLGENERATEMIPMAPPROC, glGenerateMipmap);
DECLARE_GL_PROC(PFNGLGENFRAMEBUFFERSPROC, glGenFramebuffers);
DECLARE_GL_PROC(PFNGLDELETEFRAMEBUFFERSPROC, glDeleteFramebuffers);
DECLARE_GL_PROC(PFNGLBINDFRAMEBUFFERPROC, glBindFramebuffer);
DECLARE_GL_PROC(PFNGLGENRENDERBUFFERSPROC, glGenRenderbuffers);
DECLARE_GL_PROC(PFNGLDELETERENDERBUFFERSPROC, glDeleteRenderbuffers);
DECLARE_GL_PROC(PFNGLBINDRENDERBUFFERPROC, glBindRenderbuffer);
DECLARE_GL_PROC(PFNGLRENDERBUFFERSTORAGEPROC, glRenderbufferStorage);
DECLARE_GL_PROC(PFNGLFRAMEBUFFERRENDERBUFFERPROC, glFramebufferRenderbuffer);
DECLARE_GL_PROC(PFNGLFRAMEBUFFERTEXTURE2DPROC, glFramebufferTexture2D);
DECLARE_GL_PROC(PFNGLCHECKFRAMEBUFFERSTATUSPROC, glCheckFramebufferStatus);

#if defined(__WIN32__)
DECLARE_GL_PROC(PFNGLACTIVETEXTUREPROC, glActiveTexture);
#endif

//EOF
